package com.zrf.geekbang.spring.bean;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zhouruifeng
 * @date 2020-06-21
 */
public class BeanAliasDemo {

    public static void main(String[] args) {
        BeanFactory beanFactory = new ClassPathXmlApplicationContext("classpath:/META-INF/bean-definition-context.xml");
        Object user = beanFactory.getBean("user");
        Object zrfUser = beanFactory.getBean("zrfUser");
        System.out.println(user == zrfUser);
    }
}
